<script setup lang="ts">
	import { ref, onMounted } from "vue";
	import { formRules } from "./utils/rule";
	import { FormProps } from "./utils/types";
	import ReCol from "@/components/ReCol";
  import { message } from "@/utils/message";

	const props = withDefaults(defineProps<FormProps>(), {
		formInline: () => ({
			title: "",
			status: 0,
			Id: 0,
		})
	});
	const ruleFormRef = ref();
	const newFormInline = ref(props.formInline);
	function getRef() {
		return ruleFormRef.value;
	}
	defineExpose({ getRef });

  onMounted(()=> {

  })


</script>

<template>
	<el-form ref="ruleFormRef" :model="newFormInline" :rules="formRules" label-width="auto">
    <el-row :gutter="30">
      <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="品牌名称" prop="brandName">
          <el-input v-model="newFormInline.brandName" clearable placeholder="请输入品牌名称" />
      	</el-form-item>
      </re-col>
      <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="类型" prop="brandType">
          <el-select v-model="newFormInline.brandType" clearable placeholder="请选择" class="!w-[100px] ">
          	<el-option :value="item.id" :label="item.name" v-for="item in newFormInline.categoryOption" :key="item.id"></el-option>
          </el-select>
      	</el-form-item>
      </re-col>
      <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="来源" prop="origin">
          <el-radio-group v-model="newFormInline.origin">
            <el-radio :value="0">国产</el-radio>
            <el-radio :value="1">进口</el-radio>
          </el-radio-group>
      	</el-form-item>
      </re-col>
    </el-row>
	</el-form>
</template>
<style scoped>
  :deep(.el-input-number.is-without-controls .el-input__wrapper) {
    padding: 1px 11px;
  }
  :deep(.el-input-number .el-input__inner) {
    text-align: left;
  }
</style>
